home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0198 / AMOSLIST / text0023.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  2.5 KB  |  62 lines

  1. > I want to fade only a part of the screen, but i get a Syntax error
  2. > when i tryed writing in Fade 0,10,10 to 100,100
  3. > I also checked with the help function i AmosPro, but it dident say
  4. > anything about how to only fade parts of the Screen.
  5.  
  6.    AMOS doesn't directly support this due to Amiga palettes being
  7.    register-based.  If you had a hi-color videocard then it should be
  8.    possible, but then AMOS still wouldn't directly support that either...
  9.  
  10.    So, you have two (or three) real options:
  11.  
  12.    1. Use a larger palette and use different color-ranges for the
  13.        different parts of the screen.  For example, if you wanted to fade 
  14.        each quarter of the screen independantly, you could use say
  15.        a 32-color palette and allocate 8 colors for each quarter-screen
  16.        section...
  17.       ----------------
  18.       |  A      B  |
  19.       |  C      D  |
  20.       ----------------
  21.  
  22.       if you only use colors 1-7 for A, colors 8-15 for B, colors 16-23
  23.       for C and colors 24-31 for D then you can simply use the fade
  24.       command to fade in each section according to the colors used in
  25.       that section.
  26.  
  27.  2.  A twist on this if you only need to seperate the screen vertically,
  28.       then of course you can open multiple screens and fade each
  29.       independantly (or horizontal sections of each screen seperately
  30.       using the above technique).
  31.  
  32.  
  33. 3.   Finally, you could generate a light-table consisting of color-
  34.       references for each light-level: HUE_LT(ColorReg#, lightlevel) and
  35.       actually remap the pixels in the rectangular area according to
  36.       this light-table.
  37.  
  38.       You could use a simple palette-matching algorithm to build the
  39.       LT, but the best results would probably be from hand-coded
  40.       color-entries.
  41.  
  42.       The problem with this method is it will be quite slow in AMOS as
  43.       the FadeArea routine would need to rely on Point/Plot to actually
  44.       redraw the screen as it "fades"...
  45.  
  46.       This is similar to the way I implemented fading in my first IBM
  47.       programming (QBasic) as I used EGA-mode which has a fixed
  48.       16-color palette. If you take a look on my webpage, you can find
  49.       the source (in ASCII) which might be helpful if you are interested
  50.       in this light-table method. 
  51.  
  52.  
  53.  
  54.       Take  care,   
  55.       GARFIELD
  56.       -------------------------
  57.       Current projects...
  58.       SuperStarStrike98(AMIGA&IBM):15% complete(...3 days)
  59.       "Studying" POVray-coding(IBM): 20% complete
  60.       Website(http://www.sosbbs.com/~gbenjam): 35% Complete
  61.  
  62.